package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.core.example.BaseExample.E_ID;
import static org.jsola.core.example.BaseExample.M_ID_NOT_NULL;
import static org.jsola.core.example.BaseExample.N_ID;
import static org.jsola.hr.example.TemplateFieldExample.E_COMMENT;
import static org.jsola.hr.example.TemplateFieldExample.E_COMPANY_ID;
import static org.jsola.hr.example.TemplateFieldExample.E_FIELD;
import static org.jsola.hr.example.TemplateFieldExample.E_TEMPLATE_ID;
import static org.jsola.hr.example.TemplateFieldExample.M_COMMENT_MAX;
import static org.jsola.hr.example.TemplateFieldExample.M_COMPANY_ID_MAX;
import static org.jsola.hr.example.TemplateFieldExample.M_COMPANY_ID_NOT_NULL;
import static org.jsola.hr.example.TemplateFieldExample.M_FIELD_MAX;
import static org.jsola.hr.example.TemplateFieldExample.M_TEMPLATE_ID_MAX;
import static org.jsola.hr.example.TemplateFieldExample.N_COMMENT;
import static org.jsola.hr.example.TemplateFieldExample.N_COMPANY_ID;
import static org.jsola.hr.example.TemplateFieldExample.N_FIELD;
import static org.jsola.hr.example.TemplateFieldExample.N_TEMPLATE_ID;

/**
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "修改【模板字段】的参数")
@Data
public class TemplateFieldUpdateDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_ID, example = E_ID, required = true)
    @NotNull(message = M_ID_NOT_NULL)
    private String id;

    @ApiModelProperty(notes = N_TEMPLATE_ID, example = E_TEMPLATE_ID)
    @Length(max = 32, message = M_TEMPLATE_ID_MAX)
    private String templateId;

    @ApiModelProperty(notes = N_FIELD, example = E_FIELD)
    @Length(max = 255, message = M_FIELD_MAX)
    private String field;

    @ApiModelProperty(notes = N_COMMENT, example = E_COMMENT)
    @Length(max = 255, message = M_COMMENT_MAX)
    private String comment;

    @ApiModelProperty(notes = N_COMPANY_ID, example = E_COMPANY_ID, required = true)
    @NotNull(message = M_COMPANY_ID_NOT_NULL)
    @Length(max = 32, message = M_COMPANY_ID_MAX)
    private String companyId;


}

